<%@tag pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@attribute name="item" required="true" type="cn.livingCloud.dto.CaseCommentDto" %>

<c:if test="${not empty item.memberUuid}">
    <a href="#" class="pull-left">
        <img alt="${item.name}" src="${item.memberDto.headimgurl}" class="media-object">
    </a>
</c:if>
<c:if test="${empty item.memberUuid}">
    <a href="#" class="pull-right">
        <img alt="${item.name}" src="${contextPath}/resources/images/is-user.png" class="media-object">
    </a>
</c:if>

<div class="media-body">
    <c:if test="${not empty item.memberUuid}">
        <c:if test="${not item.disable}">
            <button class="btn btn-warning btn-xs pull-right reply disableComments" uuid="${item.uuid}">
                <i class="fa fa-eye-slash"></i> 屏蔽
            </button>
        </c:if>
        <c:if test="${item.disable}">
            <button class="btn btn-success btn-xs pull-right reply disableComments" uuid="${item.uuid}">
                <i class="fa fa-eye"></i> 解除屏蔽
            </button>
        </c:if>
        <button class="btn btn-primary btn-xs pull-right reply" data-toggle="modal"
                data-target="#myModal">
            <i class="fa fa-mail-reply"></i> 回复
        </button>
    </c:if>
    <h4>${item.name}</h4>
    <small class="text-muted">${item.createDateTime}</small>
    <div>
        <c:if test="${item.disable}">
            <p class="error text-danger">该留言已被屏蔽</p>
        </c:if>
        <c:if test="${not item.disable}">
            ${item.content}
        </c:if>
    </div>
</div>
